package org.app.Entity.DTO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.app.Entity.GroupUser;
import org.app.Entity.User;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserRoleDTO implements Serializable {
    private String c_id;
    private String c_name;
    private String c_img;
    private String c_phone;

    private String group_id;
    private String c_nickname;
    private Integer role_id;

    public UserRoleDTO(User user, GroupUser groupUser) {
        this.c_id = user.getC_id();
        this.c_name = user.getC_name();
        this.c_img = user.getC_img();
        this.c_phone = user.getC_phone();

        this.group_id = groupUser.getGroup_id();
        this.c_nickname = groupUser.getC_nickname();
        this.role_id = groupUser.getRole_id();
    }
}
